package com.cisdi.analysis.common.util;

/**
 * @author liujunnan
 * @date 2018/5/23
 */
public class StringUtil {

    /**
     * 检测字符串是否不为空(null,"","null")
     * @param str 需要进行判断的字符串
     * @return 不为空则返回true，否则返回false
     */
    public static boolean notEmpty(String str) {
        return str != null && !"".equals(str) && !"null".equals(str);
    }

    public static String[] deleteByIndex(String[] array, int index) {
        String[] newArray = new String[array.length - 1];
        for (int i = 0; i < newArray.length; i++) {
            if (i < index) {
                newArray[i] = array[i];
            } else {
                newArray[i] = array[i + 1];
            }
        }
        return newArray;
    }
}
